In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than the length of the remaining side.[1][2]
In Euclidean geometry and some other geometries the triangle inequality is a theorem about distances. In Euclidean geometry, for right triangles it is a consequence of Pythagoras' theorem, and for general triangles a consequence of the law of cosines, although it may be proven without these theorems. The inequality can be viewed intuitively in either R2 or R3. The figure at the right shows three examples beginning with clear inequality (top) and approaching equality (bottom). In the Euclidean case, equality occurs only if the triangle has a 180° angle and two 0° angles, making the three vertices colinear, as shown in the bottom example. Thus, in Euclidean geometry, the shortest distance between two points is a straight line.
In spherical geometry, the shortest distance between two points is an arc of a great circle, but the triangle inequality holds provided the restriction is made that the distance between two points on a sphere is the length of a minor spherical line segment (that is, one with central angle in [0, π]) with those endpoints.[3][4]
The triangle inequality is a defining property of norms and measures of distance. This property must be established as a theorem for any function proposed for such purposes for each particular space: for example, spaces such as the real numbers, Euclidean spaces, the Lp spaces (p ≥ 1), and inner product spaces.
Contents |
Euclid proved the triangle inequality for distances in plane geometry using the construction in the figure.[5] Beginning with triangle ABC, an isosceles triangle is constructed with one side taken as BC and the other equal leg BD along the extension of side AB. It then is argued that angle β > α, so side AD > AC. But AD = AB + BD = AB + BC so the sum of sides AB + BC > AC. This proof appears in Euclid's Elements, Book 1, Proposition 20.[6]
A specialization of this argument to right triangles is:[7]
The second part of this theorem already is established above for any side of any triangle. The first part is established using the lower figure. In the figure, consider the right triangle ADC. An isosceles triangle ABC is constructed with equal sides AC. From the triangle postulate, the angles in the right triangle ADC satisfy:
Likewise, in the isosceles triangle ABC, the angles satisfy:
Therefore,
and so, in particular,
That means side AD opposite angle α is shorter than side AB opposite the larger angle β. But AB = AC. Hence:
A similar construction shows AC > DC, establishing the theorem.
An alternative proof (also based upon the triangle postulate) proceeds by considering three positions for point B:[8] (i) as depicted (which is to be proven), or (ii) B coincident with D (which would mean the isosceles triangle had two right angles as base angles plus the vertex angle γ, which would violate the triangle hypothesis), or lastly, (iii) B interior to the right triangle (in which case angle ABC is an exterior angle of a right triangle and therefore larger than π/2, meaning the other base angle of the isosceles triangle also is greater than π/2 and their sum exceeds π in violation of the triangle postulate).
This theorem establishing inequalities is sharpened by Pythagoras' theorem to the equality that the square of the length of the hypotenuse equals the sum of the squares of the other two sides.
The triangle inequality can be used to prove that the shortest curve between two points in Euclidean geometry is a straight line. First, the triangle inequality can be extended by mathematical induction to arbitrary polygonal paths, showing that the total length of such a path is no less than the length of the straight line between its endpoints. Thus no polygonal path between two points is shorter than the line between them.
The result for polygonal paths implies that the length of any rectifiable curve is no less than the distance between its endpoints. By definition, the length of a curve is the least upper bound of the lengths of all polygonal approximations of the curve. Because each of these approximations is no shorter than the straight line path, the curve itself cannot be shorter than the straight line path.[9]
In a normed vector space V, one of the defining properties of the norm is the triangle inequality:
that is, the norm of the sum of two vectors is at most as large as the sum of the norms of the two vectors. This is also referred to as subadditivity. For any proposed function to behave as a norm, it must satisfy this requirement.[10]
The triangle inequality is useful in mathematical analysis for determining the best upper estimate on the size of the sum of two numbers, in terms of the sizes of the individual numbers.
There is also a lower estimate, which can be found using the reverse triangle inequality which states that for any real numbers x and y:
![]() |
![]() |
![]() |
|
![]() |
|
![]() |
|
![]() |
In a metric space M with metric d, the triangle inequality is a requirement upon distance:
for all x, y, z in M. That is, the distance from x to z is at most as large as the sum of the distance from x to y and the distance from y to z.
The reverse triangle inequality is an elementary consequence of the triangle inequality that gives lower bounds instead of upper bounds. For plane geometry the statement is:[13]
In the case of a normed vector space, the statement is:
or for metric spaces, | d(x, y) − d(x, z) | ≤ d(y, z). This implies that the norm ||–|| as well as the distance function d(x, –) are Lipschitz continuous with Lipschitz constant 1, and therefore are in particular continuous.
In the usual Minkowski space and in Minkowski space extended to an arbitrary number of spatial dimensions, assuming null or timelike vectors in the same time direction, the triangle inequality is reversed:
A physical example of this inequality is the twin paradox in special relativity.